package org.lanqiao.tjut.service.impl;

import javax.annotation.Resource;

import org.lanqiao.tjut.bean.UsersEntity;
import org.lanqiao.tjut.dao.IUsersDao;
import org.lanqiao.tjut.service.IUserInfoService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service("userService")
public class UserInfoService implements IUserInfoService {
	// 组合到层对象，进行依赖注入
	// 组合service层，依赖注入
	@Resource
	private IUsersDao userDao;

	/**
	 * 使用id获取用户信息
	 * 
	 * @param userid
	 *            用户id
	 * @return 用户信息
	 */
	@Override
	@Transactional(propagation = Propagation.REQUIRED)
	public UsersEntity selectUsersInfo(Integer userid) {
		return userDao.selectUsersInfo(userid);
	}
}
